<?php
/*
 * @Author: 李志刚
 * @CopyRight: 2020-2030 衡水山木枝技术服务有限公司
 * @Date: 2018-01-25 16:10:38
 * @Description: 用户砍价记录
 * @LastEditors: 李志刚
 * @LastEditTime: 2021-10-19 18:15:32
 * @FilePath: /归档/expand/2018_01_25_153647_create_bargaon_logs.php
 */

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBargaonLogs extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('bargain_logs', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->id();
            $table->foreignId('bargain_id')->default(0)->comment('砍价活动id');
            $table->foreignId('user_id')->default(0)->comment('用户id');
            $table->foreignId('bargain_order_id')->default(0)->comment('砍价活动订单id');
            $table->decimal('price',10,2)->default(0)->comment('砍掉金额');
            $table->timestamp('bargaintime')->nullable()->comment('砍价时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('bargain_logs');
    }
}
